-
Couldn't load subscription status.
- Fork 410
[Store] Add master side QP calculation #742
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
db19705 to
5d6c4a2
Compare
|
@SgtPepperr could you review this PR? |
| return tl::make_unexpected(ErrorCode::INTERNAL_ERROR); | ||
| } | ||
| return PingResponse(view_version_, client_status); | ||
| return PingResponse(view_version_, client_status, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks like qp_count should be passed in as a parameter here?
| MasterMetricManager::instance().inc_ping_requests(); | ||
|
|
||
| auto result = master_service_.Ping(client_id); | ||
| auto result = master_service_.Ping(client_id, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks like qp_count should be passed in as a parameter here?
| // Increment cluster total QP number based on client's reported QP count | ||
| MasterMetricManager::instance().inc_cluster_total_qp_num( | ||
| result.value().total_qp_num); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current implementation increments QP count on every ping operation which may cause inaccurate counting, so maybe we should maintain a map<uuid, qpcount> in master_metrics to update each client's status during pings and sum all qpcounts when queried.
Followup of #738